<template>
	<div class="wdxq2" :style="{'min-height':Height-73+'px'}">
		<div class="wdxq_title flex align_center">
			<i class="el-icon-arrow-left" style="float: left;margin-left: 4%;font-size: 2.4rem;" @click="fh"></i>
			<span class="flex1">个性签名</span>
			<span style="float: right;margin-right: 4%;font-size: 1.6rem;" @click="setUserContent">
				保存
			</span>
		</div>
		<div class="dtjb clear2">
			<el-input
			  type="textarea"
			  placeholder="说两句让别人了解你，不超过500字"
			  v-model="reason"
			  style='border: 0;'
			  :maxlength='500'
			  >
			</el-input>
			<span style="font-size: 1.5rem;float: right;color: #666;">{{reason.length}}/500</span>
		</div>
		<div class="wdxq_div4" style="margin-top: 1rem;">
			<p class="wdxq_div4p2" style=";text-indent: 0;text-align: justify;">小提示：为了您的信息安全，请不要在内心独白内填写微信、QQ、手机号等带有联系方式的个人信息</p>
		</div>

	</div>
</template>

<script>
	import { Toast } from 'mint-ui';
	export default {
		data: function() {
			return {
				reason:'',
				Height:0,
				tabI:0,

			}
		},
		mounted() {
			this.Height=document.body.offsetHeight;
			if(this.$route.query){
				this.reason=this.$route.query.content;
			}
		},
		methods: {
			fh(){
        		window.history.go(-1);
        	},
        	setUserContent(){
        		this.$http.post(this.defines.setUserContent,{
        			uid:window.uid,
        			content:this.reason,
        		}, {
						emulateJSON: true
					})
					.then(
						(data) => {
							if(data.data.success){
								Toast('提交成功');
								this.fh();
							}
							else{
								Toast(data.data.errmsg);
							}
						},
						(error) => {
							console.log(error);
						}
					);
        	}
		}
	}
</script>
<style scoped="scoped">
	.dtjb {
		width: 90%;
		background: #fff;
		color: #000;
		font-size: 1.5rem;
		padding: 3% 3%;
		margin: 2%;
		box-shadow: 0px 0px 2px 1px #d4d4d4;
		border-bottom: 1px solid #f1f1f1;
	}
</style>
<style>
	.dtjb textarea{
		border: 0px !important;
		min-height: 100px !important;
		padding: 0 !important;
		
	}
</style>